<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>修改用户</title>
<link rel="stylesheet" href="${ctx}/css/base.css">
<link rel="stylesheet" href="${ctx}/layui/css/layui.css" media="all">
</head>
<body>
	<div class="body_top_marger10">
		<div class="layui-main layui-form-pane" style="width: 550px">
			<form class="layui-form" action="">
				<div class="hidder_body">
					<input type="hidden" id="id" name="id" value="${user.id }">
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label"><font color="red">*</font>登录账号</label>
					<div class="layui-input-inline">
						<input type="text" id="loginName" readonly="readonly"
							name="loginName" value="${user.loginName }" required
							lay-verify="required" placeholder="请输入账号" autocomplete="off"
							class="layui-input">
					</div>
					<div class="mds-form-input-aux">PS：账号不允许修改</div>
				</div>
				<c:if test="${loginUserId==1}">
					<div class="layui-form-item">
						<label class="layui-form-label">登录密码</label>
						<div class="layui-input-inline">
							<input type="text" id="loginPassword" 
								name="loginPassword"  
								 placeholder="请输入密码" autocomplete="off"
								class="layui-input">
						</div>
						<div class="mds-form-input-aux">PS：超级管理员使用,若不需要修改密码则不填写</div>
					</div>
				</c:if>
				<div class="layui-form-item">
					<label class="layui-form-label"><font color="red">*</font>姓名或昵
						称</label>
					<div class="layui-input-inline">
						<input type="text" id="userName" name="userName"
							value="${user.userName }" required lay-verify="required"
							placeholder="请输入昵称" autocomplete="off" class="layui-input">
					</div>
					<div class="mds-form-input-aux">PS：中国人的话尽可能使用中文昵称吧</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">所属组织</label>
					<div class="layui-input-block">
						<select name="organization" lay-verify="required">
							<c:forEach var="organization" items="${organizationList}" varStatus="num">
								<c:if test="${organization.id==user.organizeId}">
									<option value="${organization.id}" selected="selected">${organization.organizeName }</option>
								</c:if>
								<c:if test="${organization.id!=user.organizeId}">
									<option value="${organization.id}">${organization.organizeName }</option>
								</c:if>
							</c:forEach>
						</select>
					</div>
				</div>

				<div class="layui-form-item">
					<div class="layui-input-block">
						<button class="layui-btn" lay-submit lay-filter="formSubmit">保存</button>
						<button type="reset" class="layui-btn layui-btn-primary">重置</button>
					</div>
				</div>
			</form>
		</div>
	</div>
	<script src="${ctx}/js/jquery.min.js"></script>
	<script src="${ctx}/layui/layui.js"></script>
	<script type="text/javascript">
		var rootPath = '${ctx}';
	</script>
	<script src="${ctx}/js/jfTable.js"></script>
	<script src="${ctx}/js/system/user/user_update.js"></script>
</body>
</html>